<title>权限管理</title>
<!-- /section:settings.box -->
<div class="row">
	<div class="col-xs-12 root">
		<div class="row">
			<div class="col-xs-12">
				<!-- 要修改的地方，from标签 action属性 -->
				<form class="form-horizontal registerform" method="POST">
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">市场检查科：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="1"> 项目配套绿地监督管理 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="2"> 登记监督项目 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">质量监督科：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="3"> 项目监督审核并立项 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="4"> 工程质量监督管理 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="21"> 受理竣工验收申请 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="22"> 竣工验收备案管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">企业管理科：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="5"> 资质审查收件登记 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="6"> 三级类资质审查列表</a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="7"> 在线三级初审入口(A) </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="8"> 在线三级初审入口(B) </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="9"> 二级类资质审查列表</a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="10"> 在线二级初审入口(A) </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="11"> 在线二级初审入口(B) </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="20"> 在线二级初审入口(C) </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="12"> 资质证书管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">招投标科：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="13"> 找投标项目管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">行政处罚：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="23"> 行政处罚管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					 <!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">用户管理：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="14"> 用户列表管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">企业及人员信息库：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="15"> 企业管理 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="16"> 人员管理 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<!-- 输入div开始 -->
					<div class="space-4"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right"
							for="form-field-name">系统管理：</label>
						<div class="input-group col-sm-9">
							<div class="in_txt in_txt_hover js_hover">
								<a href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="17"> 管理员列表 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="18"> 部门列表 </a> <a
									href="javascript:;" class="btn btn-mini btn-grey"
									data-hover="guan" data-indentity="19"> 数据字典 </a>
							</div>
						</div>
					</div>
					<!-- 输入div结束 -->
					<div class="space-4"></div>
					<div class="clearfix form-actions">
						<div class="col-md-offset-2 col-md-9">
							<button class="btn btn-info save" type="button" id="btnSubmit">
								<i class="ace-icon fa fa-check bigger-110"> </i>保存
							</button>
							&nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="ace-icon fa fa-undo bigger-110 reset"> </i>还原
							</button>
						</div>
					</div>
				</form>
			</div>
			<!-- PAGE CONTENT ENDS -->
			<script type="text/javascript">var scripts = [null,	null];
var $scope = $(".root");
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
			$(".js_hover a").click(function() {
				var this_a = $(this)
				data_hover = this_a.attr("data-hover")
				if (data_hover == "guan") {
					this_a.removeClass("btn-grey")
					this_a.addClass("btn-success")
					this_a.attr("data-hover", "kai")
				}
				if (data_hover == "kai") {
					this_a.addClass("btn-grey")
					this_a.removeClass("btn-success")
					this_a.attr("data-hover", "guan")
				}
			})
			var power_list = '<?=$model['sys_role'] ?>';
			power_list = power_list.split(',');
			for (var i = 0; i < power_list.length; i++) {
				$(".js_hover a[data-indentity='" + power_list[i] + "']", $scope).trigger("click");
			}
			$("#btnSubmit").click(function() {
			var role_ids = "";
			$(".js_hover a[data-hover='kai']").each(function() {
				role_ids += $(this).attr("data-indentity") + ",";
			});
			role_ids = role_ids.substr(0, role_ids.length - 1); //删除最后一个无效","
			$.post('/sys/ajax_set_power', {
				'id': '<?=$model['id'] ?>',
				'power': role_ids
				},function(msg) {
	if (200 === msg.status) {
		message_box.show('设置权限成功', 'success');
		gDialog.fClose();
		pageObj.cur_page();
	} else {
		message_box.show(ret.data, 'error');
	}
}, 'json');
});
})</script>
		</div>
	</div>
</div>

